That is a travesty, to say the least.
0% blame to referee
100% blame to assistant
a) missed the offside on the free kick
b) missed Henry
I don't know if this is always how it's done, but I always thought on free kicks like that, the referee holds the line and watches for the offside, while the assistant goes down to the goal line. If this had been the case, maybe both infractions would have been detected. Either way, the assistant should have at least put the flag up for the offside. He even had a second chance when the ref went over to talk to him after the goal.